home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / Utilities / Interfaces / BndNSUtl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  3.7 KB  |  104 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        BndNSUtl.h
  3.  
  4.     Contains:    Binding utilities for EditorSetup.
  5.  
  6.     Owned by:    Caia Grisar
  7.  
  8.     Copyright:    © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10. */
  11.  
  12.  
  13. #ifndef _BNDNSUTL_
  14. #define _BNDNSUTL_
  15.  
  16. #ifndef _ODTYPES_
  17. #include <ODTypes.h>
  18. #endif
  19.  
  20. #ifndef _PLFMFILE_
  21. #include "PLFMFile.h"
  22. #endif
  23.  
  24. //==============================================================================
  25. // Classes used by this interface
  26. //==============================================================================
  27. class    ODTypeList;
  28. class    EditorSet;
  29. class    ODNameSpaceManager;
  30. class    ODStorageUnitView;
  31. class    ODPart;
  32.  
  33. //==============================================================================
  34. // functions
  35. //==============================================================================
  36. extern "C" {
  37.  
  38. ODEditor SetSysPrefEditorForKind(ODNameSpaceManager* theNameSpaceManager, 
  39.                                     ODType kind, ODEditor editor);
  40.     // Sets the system-wide preferred editor for the argument data kind.
  41.     // This routine will overwrite any preference set by the user.
  42.  
  43. ODEditor SetSysPrefEditorForCategory(ODNameSpaceManager* theNameSpaceManager, 
  44.                                     ODType category,ODEditor editor);
  45.     // Sets the system-wide preferred editor for the argument data category.
  46.     // This routine will overwrite any preference set by the user.
  47.  
  48. ODEditor GetSysPrefEditorForKind(ODNameSpaceManager* theNameSpaceManager, 
  49.                                     ODType kind);
  50.     // Returns the system-wide preferred editor for the argument data kind.
  51.     // A null value is returned if no preference has been specified.
  52.     // This routine checks to ensure that the preferred editor actually exists;
  53.     // if it does not, the preference is canceled and null is returned.
  54.  
  55. ODEditor GetSysPrefEditorForCategory(ODNameSpaceManager* theNameSpaceManager, 
  56.                                     ODType category);
  57.     // Returns the system-wide preferred editor for the argument data category.
  58.     // A null value is returned if no preference has been specified.
  59.  
  60. ODTypeList* GetCategoriesOfKind(ODNameSpaceManager* theNameSpaceManager, 
  61.                                     ODType kind);
  62.     // Returns the categories of the argument data kind, in the content of the
  63.     // argument storage unit.  The client must dispose of the result.
  64.  
  65. ODBoolean GetUserKindFromKind( ODNameSpaceManager* theNameSpaceManager, 
  66.                                     ODType kind, ODName** name );
  67. ODBoolean GetUserEditorFromEditor( ODNameSpaceManager* theNameSpaceManager, 
  68.                                     ODType editor, ODName** name );
  69. ODBoolean GetUserCatFromCat( ODNameSpaceManager* theNameSpaceManager, 
  70.                                     ODType category, ODName** name );
  71.  
  72. ODOSType ODGetODOSTypeForKind(ODNameSpaceManager* theNmSpcMgr, ODType kind);
  73.  
  74. ODBoolean EditorSupportsKind( ODNameSpaceManager* theNameSpaceManager, 
  75.                                     ODEditor editor, ODType kind );
  76.         // Returns true if the argument editor supports the argument data type
  77.         // without translation.
  78.  
  79. ODBoolean GetAllEditorsForCategory( ODNameSpaceManager* theNameSpaceManager,
  80.                                 ODType category, EditorSet* theEditorSet );
  81.         // Returns the set of Editors supporting the argument data category without translation.
  82.  
  83. ODBoolean GetAllEditorsForKind(ODNameSpaceManager* theNameSpaceManager,
  84.                                 ODType kind, EditorSet* theEditorSet);
  85.         // Returns the set of Editors supporting the argument data kind without translation.
  86.  
  87. void GetAllKindsForEditor(ODNameSpaceManager* theNmSpcMgr,
  88.                                 ODTypeList*    kindList, ODEditor editorID);
  89.  
  90. ODULong ReadSize(ODFileRefNum file, ODStorageUnitView* view);
  91.  
  92. void ReadBytes(ODFileRefNum file, ODStorageUnitView* view,
  93.                         ODPtr bytes, ODULong* length);
  94.                         
  95. EditorSet* ODGetEditorSetFromResFile(ODSShort resRefNum);
  96.  
  97.         // Returns the set of Editors IDs (if any) found in this file
  98.  
  99. EditorSet* ODGetEditorSetFromNMAP(ODHandle nmap );
  100.  
  101. }    // End of extern "C" {
  102.  
  103. #endif // _BNDNSUTL_
  104.